package com.amos.think.respository.impl;

import com.amos.think.domain.user.UserEntity;
import com.amos.think.respository.UserRespository;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class UserRespositoryImple implements UserRespository {

    private final String USER = "User";

    @Resource
    private MongoTemplate mongoTemplate;

    //mongDB数据新增
    @Override
    public void save(UserEntity user) {
        mongoTemplate.save(user,USER);
    }
}
